﻿using System;
using Jayden.Dll.Web.Enums;
using Jayden.Dll.Web.HtmlControls.Descriptions;
using Jayden.Dll.Web.HtmlControls.Generics;
using Jayden.Dll.Web.HtmlControls.Interfaces;

namespace Jayden.Dll.Web.HtmlControls
{
	public class Base : HtmlElement, WithHRef, WithTarget
	{
		public Base() : base(BaseDescription.Instance) { }

		public string HRef { get { return this["href"]; } set { this["href"] = value; } }
		public string Target { get { return this["target"]; } set { this["target"] = value; } }
	}
	public class BaseDescription : HtmlElementDescription
	{
		public static readonly BaseDescription Instance = new BaseDescription();
		private BaseDescription() : base("base", HtmlVersion.Html4, false, false) { }
		public override Type ControlType { get { return typeof(Base); } }
		public override string Description { get { return "document-wide base URL for the purposes of resolving relative URLs, and a document-wide default browsing context name for the purposes of following hyperlinks."; } }
	}
}
